<?php

class Frontend_CommentController extends Zend_Controller_Action {

    public function init() {
        /* Initialize action controller here */
    }

    public function indexAction() {
        // action body
    }

    public function addAction() {
        $intID = $this->getParam('post_id', 0);
        $current = new Application_Model_DateTime();
        if ($this->getRequest()->getMethod() == 'POST') {
            $arrComment = $this->getParam('Comment', array());  
            $arrComment['create_time']=$current->getCurrent();        
            $objComment = new Application_Model_Comments();
            $objComment->createComment($arrComment);
            $this->_helper->redirector('details', 'post', null, array('id' => $intID));
        } else {
            $this->view->assign('intPostID', $intID);
        }
    }
    
    

}
